{% load i18n %}
<div class="row border-bottom">
    <nav class="navbar navbar-static-top white-bg" role="navigation" style="margin-bottom: 0">
        <div class="navbar-header">
            <a class="navbar-minimalize minimalize-styl-2 btn btn-primary " href="#"><i class="fa fa-bars"></i> </a>
            <!--<form role="search" class="navbar-form-custom" method="get" action="">-->
            <!--<div class="form-group">-->
            <!--<input type="text" placeholder="{% trans 'Search' %}..." class="form-control" name="search" id="top-search">-->
            <!--</div>-->
            <!--</form>-->
        </div>
        <ul class="nav navbar-top-links navbar-right">
            <li class="dropdown">
                {% if request.user.is_authenticated %}
                    <a data-toggle="dropdown" class="dropdown-toggle" href="#">
                    <span class="m-r-sm text-muted welcome-message">
                        <img alt="image" class="img-circle" width="30" height="30" src="{{ request.user.avatar_url }}"/>
                        <span style="font-size: 13px;font-weight: 400"> {{ request.user.name }}
                            <b class="caret"></b>
                        </span>
                    </span>
                    </a>
                    <ul class="dropdown-menu animated fadeInRight m-t-xs profile-dropdown">
                        <li><a href="{% url 'users:user-profile' %}"><i
                                class="fa fa-cogs"> </i><span> {% trans 'Profile' %}</span></a></li>
                        {% if request.user.is_org_admin %}
                            {% if request.COOKIES.IN_ADMIN_PAGE == 'No' %}
                                <li><a id="switch_admin"><i
                                        class="fa fa-exchange"></i><span> {% trans 'Admin page' %}</span></a></li>
                            {% else %}
                                <li><a id="switch_user"><i
                                        class="fa fa-exchange"></i><span> {% trans 'User page' %}</span></a></li>
                            {% endif %}
                        {% endif %}
                        <li><a href="{% url 'authentication:logout' %}"><i
                                class="fa fa-sign-out"></i> {% trans 'Logout' %}</a></li>
                    </ul>
                {% else %}
                    <a href="{% url 'authentication:login' %}">
                        <i class="fa fa-sign-in"></i>{% trans 'Login' %}
                    </a>
                {% endif %}
            </li>
        </ul>
    </nav>
</div>

